module.exports.PRICE_INTERVAL = 2000; // interval of get goldPrice
module.exports.DB_INTERVAL = 5000;    // interval of DB synchronic
module.exports.LOOP_INTERVAL = 1000;  // interval of check trick
module.exports.SYNC_INTERVAL = 1000;  // interval of synchronize front-end SessionStorage
const PriceStack = new Array(5); //  new Array()<Price>
PriceStack.cur = function () {
    return this[this.length - 1];
}
module.exports.PriceStack = PriceStack;
module.exports.TriggerList = new Array(); //  new Array()<Trigger>
module.exports.MouseList = new Array(); // new Array()<Mouse>

// Trigger Opener. ON defalut
module.exports.TriggerSwitch = true;

// Definded Classes For Stander.
module.exports.Price = class {
    constructor({ price, c_time }) {
        this.price = price;
        this.c_time = c_time;
    }
}

module.exports.Mouse = class {
    constructor({ s_id, p_id, t_price, t_time }) {
        this.s_id = s_id;
        this.p_id = p_id;
        this.t_price = t_price;
        this.t_time = t_time;
    }
}

module.exports.Trigger = class{
    constructor({ id, script, note }) {
        this.id = id;
        this.script = script;
        this.note = note;
    }
}

module.exports.TriggerLog = class {
    constructor({ s_id, p_id, t_price, t_time }) {
        this.s_id = s_id;
        this.p_id = p_id;
        this.t_price = t_price;
        this.t_time = t_time;
    }
}


